import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:transparent_image/transparent_image.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  MyApp() {
    print("MyAppMyAppMyAppMyAppMyApp");
  }

  aa() async {
    var rs = await rootBundle.loadString('assets/json/aa.json');
    print(rs);
  }

  @override
  Widget build(BuildContext context) {
    aa();

    return MaterialApp(
      title: 'list 学习',
      home: Scaffold(
        appBar: AppBar(title: Text('aaa')),
        body: Column(
          children: <Widget>[
            // Container(
            //   height: 200,
            //   child: FadeInImage.memoryNetwork(
            //     placeholder: kTransparentImage,
            //     image: 'https://picsum.photos/250?image=9',
            //   ),
            // ),
            // FadeInImage.assetNetwork(
            //   placeholder: 'assets/images/01.gif',
            //   image: 'https://picsum.photos/250?image=9',
            // ),

            CachedNetworkImage(
              imageUrl: "https://pics7.baidu.com/feed/a71ea8d3fd1f41343d627af136d138ccd0c85e38.png?token=3d1db44450c2d3444b8dffc442327bbd",
              placeholder: (context, url) => CircularProgressIndicator(),
              errorWidget: (context, url, error) => Icon(Icons.error),
            ),


          
          ],
        ),
      ),
    );
  }
}
